# 将官方 Python 运行时用作父镜像
FROM python:3.9
# 将工作目录设置为 /root/python_docker/python-project-packaging
WORKDIR /root/python_docker

#ADD requirements.txt requirements.txt
#
## 安装 requirements.txt 中指定的任何所需软件包
## 拉取代码
#RUN pip3 install -r requirements.txt -i https://pypi.doubanio.com/simple \
#    && git clone http://10.10.10.46:8097/root/python-project-packaging.git

# 安装 requirements.txt 中指定的任何所需软件包
# 拉取代码
RUN git clone http://10.10.10.163:8097/root/python-project-packaging.git \
    && pip3 install -r python-project-packaging/requirements.txt -i https://pypi.doubanio.com/simple \
    && cd python-project-packaging \
    && pyinstaller fire.spec

# 在容器启动时运行 web_main.py
#CMD ["python3", "python-project-packaging/web_main.py"]
CMD ["./python-project-packaging/dist/fire"]

## 将官方 Python 运行时用作父镜像
#FROM python:3.9
## 将工作目录设置为 /root/python_docker/python-project-packaging
#WORKDIR ./
#
#ADD . .
#
## 安装 requirements.txt 中指定的任何所需软件包
## 拉取代码
#RUN pip3 install -r requirements.txt -i https://pypi.doubanio.com/simple
## && git clone http://10.10.10.46:8097/root/python-project-packaging.git
#
## 在容器启动时运行 web_main.py
#CMD ["python3", "web_main.py"]

# docker build -t tpbyldt .
# docker run -d -p 1652:1650 -v /root/python_item/log/:/dlog/ --name tpbyldt tpbyldt



